package online.longzipeng.cinemasys.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import online.longzipeng.cinemasys.dto.customer.CustomerQueryResponseDTO;
import online.longzipeng.cinemasys.entity.Customer;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lzp
 * @since 2021-04-09
 */
@Repository
public interface CustomerMapper extends BaseMapper<Customer> {

    /**
     * 条件查询带分页
     */
    IPage<CustomerQueryResponseDTO> getListPage(Page<CustomerQueryResponseDTO> customerPage,
                                                @Param(Constants.WRAPPER) Wrapper<CustomerQueryResponseDTO> customerQueryResponseDTOWrapper);

    /**
     * 通过id查询用户信息
     */
    CustomerQueryResponseDTO findById(Long id);
}
